package net.itbaiyang.pattern.factory;

import net.itbaiyang.pattern.email.bridge.mailType.MailStencil;
import net.itbaiyang.pattern.model.EmailDetails;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;


public interface MailMessageFactory {

    /**
     * html邮件,带附件的邮件,嵌入静态资源的邮件
     * @return
     */
    MimeMessageHelper createEmail(JavaMailSender mailSender, String from, MailStencil template) throws Exception;


    /**
     * 创建具体邮件模版
     */
    MailStencil createMailStencil(EmailDetails details);

}
